﻿#region Using directives

using System;
using System.ComponentModel;

#endregion

namespace InfoExpress.HIV.Domains
{	
	///<summary>
	/// An object representation of the 'LichSuDieuTri' table. [No description found the database]	
	///</summary>
	/// <remarks>
	/// This file is generated once and will never be overwritten.
	/// </remarks>	
	[Serializable]
	[CLSCompliant(true)]
	public partial class LichSuDieuTri : LichSuDieuTriBase
	{		
		#region Constructors

		///<summary>
		/// Creates a new <see cref="LichSuDieuTri"/> instance.
		///</summary>
		public LichSuDieuTri():base(){}	
		
		#endregion

    #region Customized Properties

    /// <summary>
    /// Get 'HanhDong' string.
    /// </summary>
    [DescriptionAttribute(@""), System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)]
    [DataObjectField(false, false, false)]
    public string HanhDong
    {
      get
      {
        return (MaKetThuc == null) ? 
          "Đăng ký điều trị" : "Kết thúc điều trị";
      }
      set {}
    }

    [DescriptionAttribute(@""), System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)]
    [DataObjectField(false, false, false)]
    public DateTime? Ngay
    {
      get
      {
        return (MaKetThuc == null) ?
          NgayBatDau : NgayKetThuc;
      }
      set {}
    }

    /// <summary>
    /// Get 'LyDo' string.
    /// </summary>
    [DescriptionAttribute(@""), System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)]
    [DataObjectField(false, false, false)]
    public string LyDo
    {
      get
      {
        string result = string.Empty;

        if (MaKetThuc != null)
        {
          switch (MaKetThuc)
          {
            case 0:
              result = "Tử vong";
              break;
            case 1:
              result = "Mất hút";
              break;
            case 2:
              result = string.Format("Chuyển sang OPC {0}", TenOpc);
              break;
            default:
              result = string.Empty;
              break;
          }
        }

        return result;
      }
      set {}
    }

    /// <summary>
    /// Ten OPC.
    /// </summary>
    [DescriptionAttribute(@""), System.ComponentModel.Bindable(System.ComponentModel.BindableSupport.Yes)]
    [DataObjectField(false, false, false)]
    public string TenOpc { get; set; }
    #endregion
  }
}
